package com.cxps.server.inventory.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.cxps.server.inventory.domain.*;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 商品库存信息表 Mapper 接口
 * </p>
 *
 * @author YouCai.Liu
 * @since 2021-11-02
 */
@Mapper
public interface InventoryInfoMapper extends BaseMapper<InventoryInfoEntity> {

    List<InventoryInfoVo> list(@Param("page") Page page, @Param("query") InventoryInfoQuery query);

    List<InventoryFlowingVo> flowingList(@Param("page") Page page, @Param("query") InventoryInfoQuery query);

    void updateWarningByIds(@Param("ids") String[] ids, @Param("inventoryMin") Integer inventoryMin, @Param("inventoryMax") Integer inventoryMax);

    void updateWarningByQuery(@Param("query") InventoryInfoQuery query, @Param("inventoryMin") Integer inventoryMin, @Param("inventoryMax") Integer inventoryMax);

    void saveInventoryKcInfo(@Param("kcRk") InventoryKcInfo kcRk);

    List<InventoryKcInfoVo> selectRunningWater(String productId);

}
